import Vue from 'vue'
import Router from 'vue-router'
import index from '@/views/index'//首页页面
import Login from '@/views/login/login'//登录页面
import regist from '@/views/login/Regist'//注册页面
import BackPassword from '@/views/login/BackPassword'  //密码找回页面
import adminindex from '@/views/useradmin/adminindex' //管理后台页面
import welcome from '@/views/main/Welcome'  //管理后台欢迎页面
import users from '@/views/useradmin/users'  // 管理后台-用户管理
import classz from '@/views/useradmin/classz'   // 管理后台-班级管理
import home from '@/views/main/home'  //首页最新内容展示页面
import home1 from '@/views/main/home1'  //首页最热内容展示页面
import themecontent from '@/views/main/theme-content' //主题帖详情
import Msgindex from '@/views/msg/msgindex'  // 消息页面
import userself from '@/views/oneself/profile'  // 个人信息
import profile from '@/views/oneself/profile'  // 个人基本信息
import plate from '@/views/main/plate'   //板块分类页面
import platetheme from  '@/views/main/plate_theme'   //板块主题页面
import mypost from '@/views/oneself/my-post'   //我的帖子页面
import myreply from '@/views/oneself/my-reply'   //我的回复
import myclass from  '@/views/oneself/my-class'  //我的班级
import notice from  '@/views/msg/notice'    //班级信息
import findliketheme from "@/views/main/findliketheme";  // 帖子的模糊查询
import admin from "@/views/useradmin/admin"  //管理员信息页面
import teacher from "@/views/useradmin/teacher"  //教师用户信息页面
import adminplate from "@/views/useradmin/admin-plate"  // 板块信息管理页面
import admintheme from "@/views/useradmin/admin-theme"  // 主题帖信息管理页面


Vue.use(Router)

export default new Router({
  mode:'history',
  routes: [
    {
      path: '/',
      name: 'index',
      component: index,
      children:[
        {
          path:'/',
          name:'home',
          component:home
        },
        {
          path:'/home1',
          component:home1
        },
        {
          path:'userself',
          component:userself
        },
        {
          path:'msgindex',
          component: Msgindex
        },
        {
          path:'themecontent',
          component: themecontent
        },
        {
          path:'plate',
          component:plate
        },
        {
          path:'platetheme',
          component:platetheme
        },
        {
          path:'mypost',
          component:mypost
        },
        {
          path:'myreply',
          component: myreply
        },
        {
          path:'profile',
          component:profile
        },
        {
          path:'myclass',
          component: myclass
        },
        {
          path:'notice',
          component:notice
        },
        {
          path:'findliketheme',
          component: findliketheme
        },
      ]
    },

    {
      path:'/adminindex',
      component: adminindex,
      children:[
        {
          path:'/',
          component:welcome
        },
        {
          path:'users',
          component:users
        },
        {
          path:'classz',
          component:classz
        },
        {
          path:'admin',
          component:admin
        },
        {
          path:'teacher',
          component:teacher
        },
        {
          path:"admintheme",
          component:admintheme
        },
        {
          path:"adminplate",
          component:adminplate
        },


      ]
    },
    {
      path: '/login',
      name: 'Login',
      component: Login
    },
    {
      path: '/regist',
      name: 'regist',
      component: regist
    },
    {
      path: '/backpassword',
      component: BackPassword
    },

  ]
})
